package com.mdb.open.trade.domain.dto.trade;


/*
* Copyright (C), 2017-2019 澳发科技(MDB)
* FileName: TfTradeFileBasicInfoService.java
* Author:   you.yichao
* Date:     2019-10-11
* History:
* <author>          <time>          <version>          <desc>
* you.yichao         2019-10-11          V1.00             代码生成器初始生成代码
* -----------------------------------------------------------
* 作者姓名           修改时间           版本号            描述
*/

import com.mdb.bc.api.data.DataObjectBase;
import com.mdb.bc.validator.annotaion.validation.Num;
import com.mdb.open.common.enums.trade.type.BusinessTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
* 类描述：
*  融资档案业务基本资料表数据传输类
*
* @author you.yichao
* @date 2019-10-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TradeFileBasicInfoDto", description="融资档案业务基本资料表Dto对象")
public class TradeFileBasicInfoDto extends DataObjectBase {

    private static final long serialVersionUID = 1L;

    /**
    * 融资档案编号
    */
    @ApiModelProperty(value = "融资档案编号", hidden = true)
    private String tradeFileNo;

    /**
    * 商户编号
    */
    @ApiModelProperty(value = "商户编号")
    @NotBlank(message = "商户编号不允许为空")
    @Size(max = 64, message = "商户编号最长为{max}位")
    private String merchantNo;

    /**
     * 业务编号
     */
    @ApiModelProperty(value = "业务编号")
    @NotBlank(message = "业务编号不允许为空")
    @Size(max = 50, message = "业务编号不能超过{max}个字")
    private String businessNo;

    /**
     * 业务模式
     */
    @ApiModelProperty(value = "业务模式")
    private BusinessTypeEnum businessType;

    /**
     * 进口方中文名称
     */
    @ApiModelProperty(value = "进口方中文名称")
    @Size(max = 60, message = "进口方中文名称不能超过{max}个字")
    private String importerCnName;

    /**
     * 进口方英文名称
     */
    @ApiModelProperty(value = "进口方英文名称")
    @Size(max = 60, message = "进口方英文名称不能超过{max}个字")
    @Pattern(regexp = "^[A-Za-z0-9/\\-?:().,'+ ]+$", message = "进口方英文名称仅支持字母、数字及以下字符：/ - ? : ( ) . , ' + CrLf Space")
    private String importerEnName;

    /**
     * 进口方地址
     */
    @ApiModelProperty(value = "进口方地址")
    @Size(max = 210, message = "进口方地址不能超过{max}个字")
//    @Pattern(regexp = "^[A-Za-z0-9/\\-?:().,'+ ]+$", message = "进口方地址仅支持字母、数字及以下字符：/ - ? : ( ) . , ' + CrLf Space")
    private String importerAddress;

    /**
     * 合同金额
     */
    @ApiModelProperty(value = "合同金额")
    @Digits(integer = 13, fraction = 2, message = "合同金额要输入阿拉伯数字（包含小数点及小数点后两位最大16位）")
    @Num(regexp = "([1-9]\\d*+(.[0-9]{1,2})?)|(0\\.[0-9]{1,2})", message = "合同金额要为正数且小数点及小数点后两位最大16位")
    @Size(max = 16, message = "合同金额最长为{max}位")
    @NotBlank(message = "合同金额不允许为空")
    private String contractAmount;

    /**
     * 合同币种
     */
    @ApiModelProperty(value = "合同币种")
    @Size(max = 5, message = "合同币种最长为{max}位")
    @NotBlank(message = "合同币种不允许为空")
    private String contractCcy;

}
